import 'package:testlzhu/generated/json/base/json_convert_content.dart';
import 'package:testlzhu/bean/rent_bean.dart';

RentBean $RentBeanFromJson(Map<String, dynamic> json) {
	final RentBean rentBean = RentBean();
	final int? page = jsonConvert.convert<int>(json['page']);
	if (page != null) {
		rentBean.page = page;
	}
	final int? pagesize = jsonConvert.convert<int>(json['pagesize']);
	if (pagesize != null) {
		rentBean.pagesize = pagesize;
	}
	final List<RentEquipments>? equipments = jsonConvert.convertListNotNull<RentEquipments>(json['equipments']);
	if (equipments != null) {
		rentBean.equipments = equipments;
	}
	return rentBean;
}

Map<String, dynamic> $RentBeanToJson(RentBean entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['page'] = entity.page;
	data['pagesize'] = entity.pagesize;
	data['equipments'] =  entity.equipments?.map((v) => v.toJson()).toList();
	return data;
}

RentEquipments $RentEquipmentsFromJson(Map<String, dynamic> json) {
	final RentEquipments rentEquipments = RentEquipments();
	final double? sortDistance = jsonConvert.convert<double>(json['sort_distance']);
	if (sortDistance != null) {
		rentEquipments.sortDistance = sortDistance;
	}
	final String? sortVip = jsonConvert.convert<String>(json['sort_vip']);
	if (sortVip != null) {
		rentEquipments.sortVip = sortVip;
	}
	final int? sortTime = jsonConvert.convert<int>(json['sort_time']);
	if (sortTime != null) {
		rentEquipments.sortTime = sortTime;
	}
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		rentEquipments.id = id;
	}
	final int? userid = jsonConvert.convert<int>(json['userid']);
	if (userid != null) {
		rentEquipments.userid = userid;
	}
	final int? bduserid = jsonConvert.convert<int>(json['bduserid']);
	if (bduserid != null) {
		rentEquipments.bduserid = bduserid;
	}
	final String? pic = jsonConvert.convert<String>(json['pic']);
	if (pic != null) {
		rentEquipments.pic = pic;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		rentEquipments.title = title;
	}
	final String? productionyear = jsonConvert.convert<String>(json['productionyear']);
	if (productionyear != null) {
		rentEquipments.productionyear = productionyear;
	}
	final String? address = jsonConvert.convert<String>(json['address']);
	if (address != null) {
		rentEquipments.address = address;
	}
	final int? salemodel = jsonConvert.convert<int>(json['salemodel']);
	if (salemodel != null) {
		rentEquipments.salemodel = salemodel;
	}
	final String? rentpricelist = jsonConvert.convert<String>(json['rentpricelist']);
	if (rentpricelist != null) {
		rentEquipments.rentpricelist = rentpricelist;
	}
	final String? salepricelist = jsonConvert.convert<String>(json['salepricelist']);
	if (salepricelist != null) {
		rentEquipments.salepricelist = salepricelist;
	}
	final String? rewardMoney = jsonConvert.convert<String>(json['reward_money']);
	if (rewardMoney != null) {
		rentEquipments.rewardMoney = rewardMoney;
	}
	final int? rewardStatus = jsonConvert.convert<int>(json['reward_status']);
	if (rewardStatus != null) {
		rentEquipments.rewardStatus = rewardStatus;
	}
	final int? groupid = jsonConvert.convert<int>(json['groupid']);
	if (groupid != null) {
		rentEquipments.groupid = groupid;
	}
	final String? cat2icon = jsonConvert.convert<String>(json['cat2icon']);
	if (cat2icon != null) {
		rentEquipments.cat2icon = cat2icon;
	}
	final int? distance = jsonConvert.convert<int>(json['distance']);
	if (distance != null) {
		rentEquipments.distance = distance;
	}
	final int? status = jsonConvert.convert<int>(json['status']);
	if (status != null) {
		rentEquipments.status = status;
	}
	final String? equipmentpic = jsonConvert.convert<String>(json['equipmentpic']);
	if (equipmentpic != null) {
		rentEquipments.equipmentpic = equipmentpic;
	}
	return rentEquipments;
}

Map<String, dynamic> $RentEquipmentsToJson(RentEquipments entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['sort_distance'] = entity.sortDistance;
	data['sort_vip'] = entity.sortVip;
	data['sort_time'] = entity.sortTime;
	data['id'] = entity.id;
	data['userid'] = entity.userid;
	data['bduserid'] = entity.bduserid;
	data['pic'] = entity.pic;
	data['title'] = entity.title;
	data['productionyear'] = entity.productionyear;
	data['address'] = entity.address;
	data['salemodel'] = entity.salemodel;
	data['rentpricelist'] = entity.rentpricelist;
	data['salepricelist'] = entity.salepricelist;
	data['reward_money'] = entity.rewardMoney;
	data['reward_status'] = entity.rewardStatus;
	data['groupid'] = entity.groupid;
	data['cat2icon'] = entity.cat2icon;
	data['distance'] = entity.distance;
	data['status'] = entity.status;
	data['equipmentpic'] = entity.equipmentpic;
	return data;
}